package com.apollo.dubbo.consumer;

import com.apollo.dubbo.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoConsumer {
    @Reference(version = "${dubbo.service.version}", group="${dubbo.service.group}")
    private DemoService demoService;

    @GetMapping
    public String test() {
        String info = demoService.sayHello("dubbo");
        return info;
    }
}
